rdbms: fix active GTID filtering in DatabaseMysqlBase
In masterPosWait(), only $pos will have the known active domain/server set
since it usually comes from getMasterPos(). However, the reference position,
from getReplicaDB(), does not have the active domains set since querying
gtid_domain_id on the replica would be incorrect and getting a connection
to the master could be expensive.
Remove obsolete hacks for jobs that used to store master positions.
Also, use the regular Database::query() method for stylistic consistency.
Bug: T224422
Change-Id: I41bbb9f337e46451aa17788dbd446db4a213a5a7